package com.spring.aop.cglibproxy;

import org.springframework.cglib.proxy.Enhancer;

public class Test {

    public static void main(String[] args) {
        Enhancer enhancer = new Enhancer();
        enhancer.setSuperclass(CarFactor.class);     //这个人
        enhancer.setCallback(new MyIntercepter());   //干活

        CarFactor carFactor =  (CarFactor) enhancer.create();  //实际就是加强版的
        carFactor.sellCar();
    }
}
